package com.senriot.quickup.service.dto

import com.senriot.cloud.common.AbstractEntityDTO
import com.senriot.quickup.config.LOGIN_REGEX
import org.jeecgframework.poi.excel.annotation.Excel
import javax.validation.constraints.NotBlank
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size

data class StaffDTO(
        override var id: Long? = null,

        @field:NotBlank
        @field:Pattern(regexp = LOGIN_REGEX)
        @field:Size(min = 1, max = 50)
        var login: String? = null,

        @field:Size(max = 50)
        var userName: String? = null,

        @field:Size(max = 50)
        var nickName: String? = null,

        @field:Size(max = 256)
        var imageUrl: String? = null,

        var phone: String? = null,

        var status: Int? = 0,

        var openId: String? = null,

        var provinceId: Int? = null,

        @Excel(name = "省", width = 20.0)
        var provinceName: String? = null,

        var cityId: Int? = null,

        @Excel(name = "市", width = 20.0)
        var cityName: String? = null,

        var districtId: Int? = null,

        @Excel(name = "区/县", width = 20.0)
        var districtName: String? = null,

        @Excel(name = "详细地址", width = 60.0)
        var address: String? = null,

        var description: String? = null,

        var agencyId: Long? = null,

        var agencyName: String? = null
) : AbstractEntityDTO<Long>()
